<template>
  <!--  个人基本信息修改弹框-->
  <div>
    <el-dialog :title="userTitle" :width="userWidth" custom-class="user-info-dialog" :visible.sync="isShowPop">
      <userCommon v-if="userTitle === '个人基本信息修改'" :status="userStatus"  @changeData="updataInfo" :userInfo="userInfo" @showMccData="showMccData"></userCommon>
    </el-dialog>
    <MccDialog v-if="userTitle === '个人基本信息修改'" :visible.sync="MCCView"></MccDialog>
  </div>
</template>
<script>
import { deepClone } from '@/utils/utils'
import userCommon from '@/components/common/userCommon'
import MccDialog from '@/components/common/MccDialog'
export default {
  props: {
    userInfo: {},
    visible: Boolean,
    userTitle: String,
    userWidth: {
      type: String,
      default: '760px'
    }
  },
  data () {
    return {
      userStatus: '修改',
      MCCView: false
    }
  },
  components: {
    userCommon,
    MccDialog
  },
  created () {
    this.mdfInfo = deepClone(this.userInfo)
  },
  computed: {
    isShowPop: {
      get () {
        return this.visible
      },
      set (val) {
        this.$emit('update:visible', val)
      }
    }
  },
  watch: {
  },
  methods: {
    showMccData () {
      this.MCCView = true
    },
    closePop () {
      this.$emit('update:visible', false)
    },
    updataInfo () {
      this.$message({ message: '恭喜您信息修改提交成功，业务人员将在1-2日内完成审核', type: 'success' })
      this.closePop()
      localStorage.setItem('userState', '01')
      this.$emit('initData')
    }
  }
}
</script>

<style lang="less" scoped>
</style>